Views [dbo].[vSoaUserCommercePreferences]
Properties
PropertyValue
ANSI Nulls OnYes
Quoted Identifier OnYes
Created3:38:39 PM Friday, January 07, 2011
Last Modified1:49:33 PM Thursday, September 22, 2011
Columns
Name
UserCommercePreferencesId
UserId
IsStaff
DefaultCurrencyCode
SQL Script

CREATE VIEW [dbo].[vSoaUserCommercePreferences]
AS
SELECT [UserMain].[ContactMaster] AS [UserCommercePreferencesId], [UserMain].[ContactMaster] as [UserId],
CASE WHEN [Users].[UserId] IS NOT NULL THEN CAST(1 AS BIT)
  ELSE CAST(0 AS BIT)
  END
  AS [IsStaff],
(SELECT CONVERT(NVARCHAR(10),[ParameterValue]) FROM [SystemConfig] WHERE [ParameterName] = 'DefaultCurrencyCode' AND [SystemEntityKey] = '74E640E8-538D-438E-BBFD-AC48460B4758') AS [DefaultCurrencyCode]
FROM [UserMain]
LEFT OUTER JOIN [Users] ON [UserMain].[UserId] = [Users].[UserId]
WHERE [UserMain].[ContactMaster] != '';


GO
Uses